package com.service.impl;

import com.bean.Student;
import com.dao.StudentsDao;
import com.dao.impl.StudentDaoImpl;
import com.service.StudentsService;

import java.util.List;

public class StudentServiceImpl implements StudentsService {

    private StudentsDao dao = new StudentDaoImpl();
    @Override
    public List<Student> getStudents(String stuname,String stuno,int sex,int pageIndex,int pageSize) {
        return dao.getStudents(stuname,stuno,sex,pageIndex,pageSize);

    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return dao.total(stuname,stuno,sex);
    }

    @Override
    public int insertStu(Student student) {
        return dao.insertStu(student);
    }

    @Override
    public Student findById(int sid) {
        return dao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return dao.updateStu(student);
    }

    @Override
    public int delStu(String sid) {
        return dao.delStu(sid);
    }
}
